package org.school.service;

import com.github.pagehelper.PageInfo;
import org.school.entity.Cai;
import org.school.entity.Dingdan;
import org.school.entity.Shop;
import org.school.entity.message2;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.util.Date;
import java.util.List;

/**
 * (Shop)表服务接口
 *
 * @author skyme
 * @since 2023-01-13 17:44:44
 */
public interface ShopService {

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    Shop queryById(Integer id);

    /**
     * 分页查询
     *
     * @param shop 筛选条件
     * @param pageRequest      分页对象
     * @return 查询结果
     */
    Page<Shop> queryByPage(Shop shop, PageRequest pageRequest);

    /**
     * 新增数据
     *
     * @param shop 实例对象
     * @return 实例对象
     */
    Shop insert(Shop shop);

    /**
     * 修改数据
     *
     * @param shop 实例对象
     * @return 实例对象
     */
    Shop update(Shop shop);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    boolean deleteById(Integer id);

    Page<Cai> getCaiByPage(String shop, PageRequest pageRequest);



    List<Cai> queryCaiInfo(String name);

    PageInfo<Cai> findCaiInfo(String name, int page, int size);

    int deleteByHostAndId(String host, int id);

     message2 completeOrder(String name,int id);

    List<Dingdan> querryOrderByShop(String name);
}
